//////////////////////////////////////////page_showOwner/////////////////
$(document).on("pageInit", "#page_showOwner", function(e, pageId, $page) {
    my.givetitle('身份认证信息');
	              $.showPreloader()
      			  var key=my.get_key(my.getCookie('token'))
      			  var info_owner={
      					'u_userid':my.getCookie('id'),
      					}
    					info_owner=JSON.stringify(info_owner)
                        info_owner=my.cryptoASEencrypt(info_owner,key).toString()
      				    $.ajax({
      						type:"post",
      						url:api.useridentityinfo,
      						data:{
      							'api_value':info_owner
      						},
      						async:true,			
      						error:function(){
      							$.hidePreloader()
      							$.toast("请重试..");
      						},
      						success:function(data){
      							$.hidePreloader()
      							    if(data.match("err_code")!=null){
      								  switch(JSON.parse(data).err_code)
      								  {
      									case 40003:
      									    my.tokenExpire()
      									   break;
      									case 50051:
      									   $.alert(JSON.parse(data).err_msg,function(){
      									   	$.router.loadPage("home.html");
      									   });
      									   
      									   break;
      									default:
      									   $.alert(JSON.parse(data).err_msg);
      								  }
                                         
      							    }else{
      							    	    //sessionStorage.identity_info=data
      								        data=JSON.parse(data)
                                            data=JSON.parse(my.cryptoASEdencrypt(data.data,key))
                                            $('[name=u_name]').val(data[0].userfullname)
                                            $('[name=idcard]').val(data[0].useridnumber)
                                            $('[name=dri_license]').val(data[0].driverlicense)
      								        var idcard_img='<div class="swiper-slide"><img src="'+config.url+data[0].idcard_img+'">'
      							    	        $(idcard_img).appendTo('.swiper-wrapper')
      							    	    var idcard_secondimg='<div class="swiper-slide"><img src="'+config.url+data[0].idcard_secondimg+'">'
      							    	        $(idcard_secondimg).appendTo('.swiper-wrapper')
      							    	    var license_firstimg='<div class="swiper-slide"><img src="'+config.url+data[0].license_firstimg+'">'
      							    	        $(license_firstimg).appendTo('.swiper-wrapper')
      							    	    var license_secendimg='<div class="swiper-slide"><img src="'+config.url+data[0].license_secendimg+'">'
      							    	        $(license_secendimg).appendTo('.swiper-wrapper')
      							    	       
      							            var showOwnerSwiper = new Swiper('.swiper-container',{
                                                       pagination : '.swiper-pagination',
                                                       paginationElement : 'li',
                                                })
      							    }
      						},
      				});
});